package o2o.dao.PO.code;

import o2o.dao.VO.code.DiscountExchangeCodeVO;
import org.springframework.beans.BeanUtils;

/**
 * Created with IntelliJ IDEA.
 *
 * @User: @Created by yangtk
 * @Date: @Date 2020/12/1 14:12
 * @Email: yangtongkuan@qq.com
 * @To change this template use File | Settings | File Templates.
 * @desc 折扣兑换码
 */
public class DiscountExchangeCodeInfo {

    /**
     * CREATE TABLE discount_exchange_code(
     * `id` INT(11) AUTO_INCREMENT NOT NULL COMMENT 'id',
     * `exchangeCode` VARCHAR(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '兑换码',
     * `discountRate` INT(4) DEFAULT '100' COMMENT '折扣率 范围 0~100',
     * `isUse` INT(1) DEFAULT '0'  COMMENT '是否使用',
     * `useUsername` VARCHAR(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '使用者账号',
     * `useTime` BIGINT(15)  DEFAULT NULL COMMENT '使用者时间',
     * `startTime` BIGINT(15) DEFAULT NULL COMMENT '开始时间',
     * `endTime` BIGINT(15) DEFAULT NULL COMMENT '结束时间',
     * `orderNo` VARCHAR(64) DEFAULT NULL COMMENT '订单号',
     * `version` INT(4) DEFAULT '0' COMMENT '版本',
     * `delFlag` INT(1) DEFAULT '0' COMMENT '是否删除',
     * `createUser` VARCHAR(64) DEFAULT NULL COMMENT '创建者',
     * `createTime` BIGINT(15) NOT NULL COMMENT '创建日期  141231212423423时间戳毫秒级标识',
     * `updateUser` VARCHAR(22) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后更新着',
     * `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
     * PRIMARY KEY (`id`)
     * ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     */
    public Long id;
    public String exchangeCode;         // 兑换码

    private Integer discountRate;       // 折扣率 0~100范围
    private Integer fcDiscountMoney;      // 抵扣金额
    private Integer isUse;              // 是否使用
    private String useUsername;         // 使用者账号
    private Long useTime;               // 使用时间
    private Long startTime;             // 有效开始时间
    private Long endTime;               // 有效结束时间
    private String orderNo;             // 使用者订单号
    private int delFlag = 0;
    private Integer version;            // 版本
    private String createUser;          // 创建者
    private Long createTime;            // 创建时间
    private String updateUser;          // 更新时间

    public Integer getFcDiscountMoney() {
        return fcDiscountMoney;
    }

    public DiscountExchangeCodeInfo setFcDiscountMoney(Integer fcDiscountMoney) {
        this.fcDiscountMoney = fcDiscountMoney;
        return this;
    }

    public DiscountExchangeCodeVO convert2Vo() {
        DiscountExchangeCodeVO vo = new DiscountExchangeCodeVO();
        BeanUtils.copyProperties(this, vo);
        return vo;
    }

    public Long getId() {
        return id;
    }

    public DiscountExchangeCodeInfo setId(Long id) {
        this.id = id;
        return this;
    }

    public String getExchangeCode() {
        return exchangeCode;
    }

    public DiscountExchangeCodeInfo setExchangeCode(String exchangeCode) {
        this.exchangeCode = exchangeCode;
        return this;
    }

    public Integer getDiscountRate() {
        return discountRate;
    }

    public DiscountExchangeCodeInfo setDiscountRate(Integer discountRate) {
        this.discountRate = discountRate;
        return this;
    }

    public Integer getIsUse() {
        return isUse;
    }

    public DiscountExchangeCodeInfo setIsUse(Integer isUse) {
        this.isUse = isUse;
        return this;
    }

    public String getUseUsername() {
        return useUsername;
    }

    public DiscountExchangeCodeInfo setUseUsername(String useUsername) {
        this.useUsername = useUsername;
        return this;
    }

    public Long getUseTime() {
        return useTime;
    }

    public DiscountExchangeCodeInfo setUseTime(Long useTime) {
        this.useTime = useTime;
        return this;
    }

    public Long getStartTime() {
        return startTime;
    }

    public DiscountExchangeCodeInfo setStartTime(Long startTime) {
        this.startTime = startTime;
        return this;
    }

    public Long getEndTime() {
        return endTime;
    }

    public DiscountExchangeCodeInfo setEndTime(Long endTime) {
        this.endTime = endTime;
        return this;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public DiscountExchangeCodeInfo setOrderNo(String orderNo) {
        this.orderNo = orderNo;
        return this;
    }

    public int getDelFlag() {
        return delFlag;
    }

    public DiscountExchangeCodeInfo setDelFlag(int delFlag) {
        this.delFlag = delFlag;
        return this;
    }

    public Integer getVersion() {
        return version;
    }

    public DiscountExchangeCodeInfo setVersion(Integer version) {
        this.version = version;
        return this;
    }

    public String getCreateUser() {
        return createUser;
    }

    public DiscountExchangeCodeInfo setCreateUser(String createUser) {
        this.createUser = createUser;
        return this;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public DiscountExchangeCodeInfo setCreateTime(Long createTime) {
        this.createTime = createTime;
        return this;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public DiscountExchangeCodeInfo setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
        return this;
    }
}
